package com.senseuni.common.dialog.indicator;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;

import com.seekwave.common.R;

import java.util.Locale;

public class SimpleProgressCircleIndicator implements ProgressIndicator {
    private CircleProgressView mProgressView;

    @Override
    public View getView(ImageView parent) {
//        mProgressView = (CircleProgressView) LayoutInflater.from(parent.getContext())
//                .inflate(R.layout.yv_simple_progress_indicator, parent, false);
        return null;
    }

    @Override
    public void onStart() {

    }

    @Override
    public void onProgress(int progress) {
        if (mProgressView == null || progress < 0 || progress > 100) {
            return;
        }

        mProgressView.setProgress(progress);
        mProgressView.setText(String.format(Locale.getDefault(), "%d%%", progress));
    }

    @Override
    public void onFinish() {

    }
}
